home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SNIP0492.ARJ / DOW.H < prev    next >
Text File  |  1991-11-19  |  242b  |  9 lines

  1. /*
  2. ** DOW.H - day-of-week macro.  From the FidoNet CECHO - by
  3. ** Paul Schlyter.
  4. */
  5.  
  6. #define dow(y,m,d)  \
  7.         ( ( ( 3*(y) - (7*((y)+((m)+9)/12))/4 + (23*(m))/9 + (d) + 2    \
  8.         + 15 - (((y)-((m)<3))/100+1) * 3 / 4 ) % 7 ) )
  9.